import java.io.{File, PrintWriter}

import scala.io.Source

/**
  *
  * @author Pop
  * @date 2022/4/23 15:14
  */
object Scala_File {

  def main(args: Array[String]): Unit = {
    // 从文件中读取数据
    Source.fromFile("src\\main\\resources\\test.txt").foreach(print)
    // 写文件
    val writer = new PrintWriter(new File("src\\main\\resources\\test1.txt"));
    writer.write("666");
    writer.close()
  }

}
